﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using DDD.Core;
using FloatComparer = DDDTest.Helper.FloatComparer;

namespace DDDTest.Core {
    [TestClass]
    public class TestPolygonMode {
        [TestMethod]
        public void Test_New1 () {
            var pmode = new PolygonMode ();

            Assert.AreEqual (CullingMode.Back, pmode.Culling);
            Assert.AreEqual (WindingMode.CCW, pmode.Winding);
            Assert.AreEqual (1.0f, pmode.LineWidth);
        }

        [TestMethod]
        public void Test_SetCulling () {
            var pmode = new PolygonMode ();
            pmode.SetCulling (CullingMode.None);

            Assert.AreEqual (CullingMode.None, pmode.Culling);
        }

        [TestMethod]
        public void Test_SetWinding () {
            var pmode = new PolygonMode ();
            pmode.SetWinding (WindingMode.CW);

            Assert.AreEqual (WindingMode.CW, pmode.Winding);
        }

        [TestMethod]
        public void Test_SetLineWidth () {
            var pmode = new PolygonMode ();
            pmode.SetLineWidth (2.0f);

            Assert.AreEqual (2.0f, pmode.LineWidth);
        }
    }
}
